package com.sophossystems.client.asmon.dao;

import com.sophossystems.client.asmon.dao.ActivityDao;
import com.sophossystems.client.asmon.dto.ActivityDTO;
import com.sophossystems.client.asmon.dto.ActivityPkDTO;
import com.sophossystems.client.asmon.exceptions.DaoException;
import java.util.List;

public interface ActivityDao
{
	/**
	 * Method 'insert'
	 * 
	 * @param dto
	 * @return ActivityPk
	 */
	public ActivityPkDTO insert(ActivityDTO dto);

	/** 
	 * Updates a single row in the Activity table.
	 */
	public void update(ActivityDTO dto) throws DaoException;

	/** 
	 * Deletes a single row in the Activity table.
	 */
	public void delete(ActivityPkDTO pk) throws DaoException;

	/** 
	 * Returns all rows from the Activity table that match the criteria 'idActivity = :idActivity'.
	 */
	public ActivityDTO findByPrimaryKey(int idActivity) throws DaoException;

	/** 
	 * Returns all rows from the Activity table that match the criteria ''.
	 */
	public List<ActivityDTO> findAll() throws DaoException;

	/** 
	 * Returns all rows from the Activity table that match the criteria 'idActivity = :idActivity'.
	 */
	public List<ActivityDTO> findWhereIdActivityEquals(int idActivity) throws DaoException;

	/** 
	 * Returns all rows from the Activity table that match the criteria 'Description = :description'.
	 */
	public List<ActivityDTO> findWhereDescriptionEquals(String description) throws DaoException;

	/** 
	 * Returns all rows from the Activity table that match the criteria 'idModule = :idModule'.
	 */
	public List<ActivityDTO> findWhereIdModuleEquals(int idModule) throws DaoException;

	/** 
	 * Returns the rows from the Activity table that matches the specified primary-key value.
	 */
	public ActivityDTO findByPrimaryKey(ActivityPkDTO pk) throws DaoException;
	
    public ActivityPkDTO findLastInsert() throws DaoException;

}
